/*
编写 : Hexh
时间 : 2012-5-25 10:31:04
*/
using System.Collections.Generic;
using HMIS.FrameWork.DomainBase;
using HMIS.Infrastructure.Core.Entities;
using HMIS.Infrastructure.Core.Repositories;

namespace HMIS.Infrastructure.Facade.Impl
{
	/// <summary>
	///	 the impl of IInfraApproveStepFacade
	/// </summary>
	public class InfraApproveStepFacadeImpl : IInfraApproveStepFacade
	{

		private readonly IInfraApproveStepRepository InfraApproveStepRepository;

		public InfraApproveStepFacadeImpl(IInfraApproveStepRepository InfraApproveStepRepository)
		{
			this.InfraApproveStepRepository = InfraApproveStepRepository;
		}

		#region IInfraApproveStep Entity Save,Get,Update,Delete

		public InfraApproveStep Get(string id)
		{
			return InfraApproveStepRepository.Get(id);
		}

		public InfraApproveStep Load(string id)
		{
			return InfraApproveStepRepository.Load(id);
		}

		public void SaveOrUpdate(InfraApproveStep entity)
		{
			this.InfraApproveStepRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			InfraApproveStepRepository.Delete(id);
		}
		
		public void PhysicsDelete(string id)
		{
			InfraApproveStepRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return InfraApproveStepRepository.IsFieldExist(fieldName, fieldValue, id);
		}
		
		public bool IsFieldExistWhere(string fieldName, string fieldValue, string id, string where)
		{
			return InfraApproveStepRepository.IsFieldExistWhere(fieldName, fieldValue, id, where);
		}
		
		#endregion
		
		#region Query 

		public IList<InfraApproveStep> GetAll()
		{
			return InfraApproveStepRepository.GetAll();
		}

		public IList<InfraApproveStep> GetPlist(string query, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return InfraApproveStepRepository.GetPlist(query, start, limit, sort, dir, filters, out total);
		}
		
		#endregion
	}
}
